package com.example.reschain.demo02.service;

import com.example.reschain.demo02.OrderContext;
import com.example.reschain.demo02.OrderHandleIntercept;
import org.springframework.stereotype.Component;

@Component
public class RepeatOrderHandleInterceptService implements OrderHandleIntercept {

    @Override
    public int sort() {
        //用于重复下单的逻辑验证，在执行顺序为1
        return 1;
    }

    @Override
    public OrderContext handle(OrderContext context) {
        System.out.println("通过seqId，检查客户是否重复下单");
        return context;
    }
}

